// index.js
// 获取应用实例
const app = getApp();

Page({
  data: {
    picSrc: "",
  },
  onLoad() {},

  onHandleTap(e) {
    let that=this;
    wx.chooseImage({
      count: 1,
      sizeType:"original",
      sourceType: ["album", "camera"],
      success(res) {
        const tempFilePaths = res.tempFilePaths;
       
        that.toAnotherPage(tempFilePaths);
      },
    });
  },
  toAnotherPage(picSrc) {
    wx.navigateTo({
      url: "../picdetail/picdetail?pic_src=" + picSrc,
    });
  },
});
